const Router = require('koa-router');
const router = new Router();
const tool = require('../../tools/tool')
const {db, QueryTypes} = require("../../models/db");

// 保存送货路线区域
router.post('/deliver/altArea', async ctx => {
    let tenantId = ctx.user.tenantId;
    let areaId = ctx.request.body.areaId;
    let buId = ctx.request.body.buId;
    await db.models['contact'].update({
        areaId: areaId,
    }, {
        where: {
            id: buId
        }
    })
    return ctx.suc('修改成功');
})

module.exports = router;
